Setting Trigger Properties

Use the Trigger Name edit box to set the trigger name.

Use the Fires dropdown list to define the trigger action time. It can be before or after to indicate that the trigger activates before or after the statement that activated it.

Insert
The trigger is activated whenever a new row is inserted into the table. For example, INSERT, LOAD DATA, and REPLACE statements.

Update
The trigger is activated whenever a row is modified. For example, UPDATE statement.

Delete
The trigger is activated whenever a row is deleted from the table. For example, DELETE and REPLACE statement. However, DROP TABLE and TRUNCATE statements on the table do not activate the trigger.

The Statement edit box defines the statement to execute when the trigger activates. To include your statement, just simply click to write. If you want to execute multiple statements, use the BEGIN ... END compound statement construct.

Example:
    BEGIN
      set new.capacity = new.capcity + 100;
      set new.amount = new.amount + 100;
    END
  

Hint: To customize the view of the editor and find out more features for sql editing, see Editor View and More Features.